#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define N 20
void mySort(char str[], int n)
{	  	 	  	 	 
    if (str == NULL || n <= 0)
        return;
    int i, j, tmp;
    for (i = 0; i < n - 1; ++i)
    {	  	 	  	 	 
        for (j = i + 1; j < n; ++j)
        {	  	 	  	 	 
            if (str[i] > str[j])
            {	  	 	  	 	 
                tmp = str[i];
                str[i] = str[j];
                str[j] = tmp;
            }
        }
    }
}	  	 	  	 	 
int main()
{	  	 	  	 	 
    char str[N];
    int n;
    printf("Input a string:");
    gets(str);
    n = strlen(str);
    mySort(str, n);
    printf("%s", str);
    return 0;
}